/*
*  封装分类表获取banner列表函数
*/
import { getHomeBannerAPI } from '@/apis/home'
import { ref, onMounted } from 'vue'

export const useBanner = () => {
    const bannerList = ref([])
    const getBannerList = async () => {
        const res = await getHomeBannerAPI({
            distributionSite: '2'
        })
        bannerList.value = res.result
    }

    onMounted(() => {
        getBannerList()
    })
    return bannerList;
}